package ycj.learn.springcloud.user.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import ycj.learn.springcloud.core.entities.Res;
import ycj.learn.springcloud.core.entities.User;


@RestController
public class UserController {

    @GetMapping("/{id}")
    public Res getOne(@PathVariable Long id) {
        User user = new User();

        user.setId(id);
        user.setName("An user who is from 8001");

        return Res.success(user);
    }
}
